home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 14 / CU Amiga Magazine's Super CD-ROM 14 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-09].iso / CUCD / Programming / samediff / Manual < prev    next >
Encoding:
Text File  |  1997-04-28  |  9.2 KB  |  247 lines

  1.  
  2.                            Same  Difference
  3.                              by S.Goodwin
  4.                            Copyright 1996/7
  5.  
  6.  
  7.                             -- Abstract --
  8.  
  9. This  programs  loads  two  ASCII   text   files  and  highlights  the
  10. differences between them both. The two  files are listed side by side,
  11. allowing them to be  compared  and  editted,  by  replacing, insert or
  12. clearing sections of the text.  It  is  very  useful tool for updating
  13. source code files, or checking alterations in a letter.
  14.  
  15.  
  16.                         -- Copyright Notice --
  17.  
  18. This software, and all its associated  documents, is copyright 1996 by
  19. Steven Goodwin. The version provided here may be freely distributed as
  20. long as no files  are  edited  or  deleted,  and  the copyright notice
  21. contained herein is not modified.
  22.  
  23.  
  24.                         -- Basic Operation --
  25.  
  26. Two files are given, and are compared. This comparison operation works
  27. by looking at the first two strings. If they are the same, the program
  28. moves onto the next pair. If different, it then searchs for the string
  29. that is identical to  it.  Assuming  it  exists,  both  lists are then
  30. padded with blank lines so  the  identical strings appear on identical
  31. lines. This makes it easier for humans to spot the differences.
  32.  
  33.  
  34.                            -- Operating --
  35.  
  36.    When the program is first run, the preferences appears...
  37.  
  38.                            - Preferences -
  39.  
  40. Each option  pertains  to  the  basic  operation  of  Same Difference.
  41. Reading from the left:
  42.  
  43. Scan Ahead      Indicates the number of lines the program will read
  44.                 before continuing to another block. This is best left
  45.                 alone, unless you know how Same Difference works
  46.                 internally. Basically, use lower numbers if you have
  47.                 a lot of identical strings in your file.
  48.  
  49. Ignore Blank    This should be left on. This is helpful because (iwhen
  50.     Lines       selected) it allows the system to synchronise the
  51.                 files following differences. Without it, the files
  52.                 might not match for sometime.
  53.  
  54. Case Sensitive  When ticked, the strings 'Hello', and 'hello' will be
  55.                 different because the strings are compared exactely.
  56.                 When this is not selected, the case is completely
  57.                 ignored.
  58.  
  59. Link Scrolls    Moves scroll A, when you (the user) moves scroll B.
  60.                 And vice-versa.
  61.  
  62. Include Termination String
  63.                 This just adds '< End Of File>' to the end. This is
  64.                 helpful because of the automatic padding that occurs
  65.                 you might see several blanks lines you do not
  66.                 recognise from your file.
  67.  
  68.  
  69. Buffer Size     There are two requesters here,
  70.         Lines   The number of lines (after padding)
  71.         Bytes   Total data size.
  72.  
  73.                 If the file is larger than either of these values,
  74.                 problems will occur. The 'after padding' comment is
  75.                 very important. If a file has a lot of changes, then
  76.                 you should increase the 'lines' value by up to double.
  77.                 There is very little memory overhead in doing this.
  78.  
  79. Colours         Indicates what colours are used to highlight the
  80.                 important bits of text.
  81.  
  82. Save            Saves the current settings into 's:'. Same Difference
  83.                 will use them upon the next load up.
  84.  
  85. Use             Utilise the settings for the current session, but it
  86.                 ignores them on following boot ups.
  87.  
  88. Cancel          Ignore any changes made.
  89.  
  90.    The last three buttons  will  all  close  the window. Upon startup,
  91. closure of this window will open another - the load window.
  92.  
  93.  
  94.                           - Load Requester -
  95.  
  96. This window features two text requesters  that accept the name of each
  97. file you wish to compare. To the  right  of these is a special button.
  98. This opens a file requester,  that  enters  the selected file into the
  99. text box on its left.
  100.  
  101.    This window also holds a 'mask' entry box. This allows you to alter
  102. which files are visible in the  file requester. By default, this shows
  103. you all the '.asc' files,  but  it  can  be  altered to show the '.c',
  104. '.txt'  or   '.qppfjdhgf'   files!   This   requester   also  supports
  105. combinations, such as '.c | .cpp' for  files ending in *either* 'c' or
  106. 'cpp'. The not operator (~) is  also supported, to exclude files (such
  107. as '~.info' to ignore all icon files).  If the file requester shows no
  108. files, then  either  the  directory  is  empty,  or  the  mask  is too
  109. restrictive. Use an empty to string to list all files.
  110.  
  111.    Hitting 'Compare' will then  cause  the  software to start working,
  112. whilst 'Close' will exit the window.
  113.  
  114.  
  115.                          - The Main Screen -
  116.  
  117. This shows two lists  and  a  block  of  buttons.  Each list shows the
  118. contents of one particular file, with the filename appearing above the
  119. list. Next to this name is a  button  marked 'Save'. This opens a file
  120. requester and saves  the  contents  of  that  particular  list  to the
  121. filename given. The default name is  as  appears in the text requester
  122. on the main window.
  123.  
  124.    The list itself can be scrolled  with  the scroll bar, or the arrow
  125. buttons. When the  gadget  is  released,  the  other  scroll list will
  126. adjust itself to show  the  same  portion  of  its list (assuming Link
  127. Scrolls is on, see Project Menu->Prefs). When  you click on an item in
  128. the list the text appears in the requester underneath the scroll. This
  129. is now the 'selected' item, and  is  used  to determine the actions of
  130. the operation buttons below the list.
  131.  
  132.    The buttons at the bottom  of  the  screen refer to the operations.
  133. All operations affect the currently selected  line, and the ones below
  134. it. You will also notice most buttons have a arrow (either '>' or '<')
  135. on it. This indicates the  direction.  For  instance, 'Replace Line >'
  136. would replace the currently selected line  into the list on the right.
  137. For a formal definition of the terms:
  138.  
  139. Line - The currently selected line, and no more.
  140.  
  141. Block - The currently selected line, and all those consecutively below
  142. it of the same type.  That  is,  if  the  current line is hightlighted
  143. because it is different, a  block  would  be  this line, and each line
  144. below it that was different. As soon as a line is identical to the one
  145. in the other list (and the colour changes), the block ends.
  146.  
  147.    The terminology for the operations:
  148.  
  149. Replace -  Overright  the  contents  in  the  other  list  with  those
  150. selected. This will make both  lines/blocks  identical, and so will be
  151. re-coloured.
  152.  
  153. Insert - Place the current line(s)  before the opposing line(s) in the
  154. other list, and pad the current list  to  keep them the same size. For
  155. example:
  156.  
  157.         ...             A               ...             A
  158.         1               B   --->        1               1
  159.         2               C               2               2
  160.         3               D               ... (padding)   B
  161.                                         ... (padding)   C
  162.                                         3               D
  163.  
  164.         ... denotes a blank line
  165.  
  166. Append - Like insert, but adds the lines after the block.
  167.  
  168. Clear - This operation does  not  affect  the opposing list. It simply
  169. clears the line  or  block  with  empty  strings.  This  in  turn will
  170. normally make the  strings  in  the  opposite  list  change  colour to
  171. indicate a difference.
  172.  
  173.  
  174.                             -- Menu Bar --
  175.  
  176. Whilst using the main  window,  there  is  a  menu bar available (upon
  177. pressing the right mouse button). This has the following options:
  178.  
  179. Open    Calls the load requester.
  180. Prefs   Opens preferences.
  181. About   Tells you about the version  number..and  the fact you haven't
  182. registered.
  183. Quit    Exits the program.
  184.  
  185.  
  186.                          -- The Final Word --
  187.  
  188. This program is shareware, you can  use  it  for 30 days before paying
  189. for it. If, however, you want  the  source,  or use it after this time
  190. then you must send me £5,  and  I'll  return  you  a disc with all the
  191. source, the latest version, and any  other utilities I've written that
  192. haven't been released yet.
  193.  
  194. Now,
  195.  
  196. Q. Where do I send my money?
  197. A. Steven Goodwin
  198.    105 St. Johns Road
  199.    Clacton-on-Sea
  200.    Essex CO16 8DB
  201.  
  202. Q. What do I say?
  203. A. Try printing this off....
  204.    (or copying the relevant bits if you're without a printer)
  205.  
  206. o/_________________________ CUT HERE ________________________________
  207. O\
  208.  
  209. Your Name:_______________
  210. Address  :_______________
  211.           _______________
  212.           _______________
  213.           _______________
  214.  
  215. Hi Mr. Steven Goodwin,
  216.  
  217.    I would like to register my copy of Same Difference because
  218.  
  219. a) I'm more interesting than a stick of celery.
  220. b) I'm funnier than a desert road from Vegas!
  221. c) I want to see you code AWE without using the AWE Shell.
  222. d) I need to debug your code !!!??!?!
  223. e) I have a tremendous guilt complex!
  224. f) All of the above                         (circle as appropriate)
  225.  
  226.    I enclose a cheque/postal order for £5 (which includes P&P) because
  227. I'm a kind hearted  soul  whos  cares  about  the  people  who make my
  228. software.
  229.  
  230.    Thanks very much,
  231.  
  232.  
  233.       Name ________________ (not completely necessary, but ties up the
  234.                              letter nicely)
  235.  
  236.  
  237. o/_________________________ CUT HERE ________________________________
  238. O\
  239.  
  240.  
  241. That's all folks!!!! See you on the next release...
  242.  
  243.  
  244.  
  245.  
  246.  
  247.